﻿@model Model.AppUserList
@{
    ViewBag.Title = "DCInventoryMove";
    Layout = "~/Views/Shared/_JQBaseLayOut.cshtml";
}
@using Model

@section JQscriptSection{
    <script type="text/javascript">
        $(document).ready(function () {
            InitGrid();

        });

        HandleDom.ClassTriggerClick("icon-reload", function () {
            InitGrid();
        });



        function InitGrid() {
            var txtMoveCode = $('#txtMoveCode').val();
            var requestWareHouseId = $('#requestWareHouseId').combobox('getValue');
            var targetWareHouseId = $('#targetWareHouseId').combobox('getValue');
            var txtGoodsCode = $('#txtGoodsCode').val();
            var txtGoodsName = $('#txtGoodsName').val();
            var Status = $('#status').combobox('getValue');



            queryParams = {
                moveCode: txtMoveCode,
                requestWareHouseId: requestWareHouseId,
                targetWareHouseId: targetWareHouseId,
                goodsCode: txtGoodsCode,
                goodsName: txtGoodsName,
                status: Status
            }
            HandleData.InitDataGrid('dg', '/DCInventoryMove/InitJsonResult', 'toolbar', queryParams, 'INVENTORYMOVEID', true, function (data) { },
                function (rowIndex, rowData) {//双击
                    edit(rowData);
                });
        }
    </script>
}

<body style="background-color: ButtonFace; font-size: 17px">
    <div class="easyui-panel" title="查询条件" style="height: 130px; padding: 5px; background: #fafafa; width: 1700px;">
        <form id="query" method="post">
            <table>
                <tr>
                    <td>搬移编码:
                    </td>
                    <td>
                        <input id="txtMoveCode" name="txtMoveCode" style="width: 154px" />
                    </td>
                    <td>请求仓库:
                    </td>
                    <td>
                        <input id="requestWareHouseId" class="easyui-combobox" name="requestWareHouseId" style="width: 155px;" data-options="required:true,valueField:'WAREHOUSEID',textField:'WAREHOUSENAME',url:'@Url.Action("GetDCWarehouseList", "DCWarehouse", new { isDefault = true, defaultValue = "请选择仓库" })',editable:false">
                    </td>
                    <td>目的仓库:
                    </td>
                    <td>
                        <input id="targetWareHouseId" class="easyui-combobox" name="targetWareHouseId" style="width: 155px;" data-options="required:true,valueField:'WAREHOUSEID',textField:'WAREHOUSENAME',url:'@Url.Action("GetDCWarehouseList", "DCWarehouse", new { isDefault = true, defaultValue = "请选择仓库" })',editable:false">
                    </td>
                    <td>商品编码:
                    </td>
                    <td>
                        <input id="txtGoodsCode" name="txtGoodsCode" style="width: 154px" />
                    </td>
                    <td>商品名称:
                    </td>
                    <td>
                        <input id="txtGoodsName" name="txtGoodsName" style="width: 154px" />
                    </td>
                    <td>搬移状态:
                    </td>
                    <td>
                        <select id="status" class="easyui-combobox" name="status" style="width: 154px;">
                            <option value="">--全部--</option>
                            <option value="0">搬移中</option>
                            <option value="1">已签收</option>
                        </select>
                    </td>
                    <td>
                        <a id="btnSerach" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="InitGrid()">查询</a>
                    </td>
                </tr>


            </table>
        </form>
    </div>
    <div style="min-height: 720px; width: 1700px;">
        <table id="dg" title="库存转仓信息" style="min-height: 600px;">
            <thead>
                <tr>
                    <th data-options="field:'INVENTORYMOVECODE',width:50">搬移编码</th>
                    <th data-options="field:'GOODSCODE',width:50">商品编码</th>
                    <th data-options="field:'GOODSNAME',width:80">商品名称</th>
                    <th data-options="field:'REQUESTWAREHOUSENAME',width:60">请求搬移仓库</th>
                    <th data-options="field:'TARGETWAREHOUSENAME',width:120">目标仓库</th>
                    <th data-options="field:'GOODSNUMBER',width:50">数量</th>
                    <th data-options="field:'REQUESTUSERNAME',width:60">请求人</th>
                    <th data-options="field:'TARGETUSERNAME',width:60">接收人</th>
                    <th data-options="field:'REQUESTDATE',width:100,sortable:true,formatter:function(value, rowData, rowIndex){ return FormatData.formatDate(value);}">请求时间</th>
                    <th data-options="field:'TARGETDATE',width:100,sortable:true,formatter:function(value, rowData, rowIndex){ return FormatData.formatDate(value);}">接收时间</th>
                </tr>
            </thead>
        </table>
    </div>
    
    @Html.Partial("~/Views/Shared/_PartialToolbar.cshtml", new Toolbar
{
    GridName = "dg",
    GridType = "datagrid",
    ToolbarName = "toolbar",
    FunctionModule = new Dictionary<string, List<FunctionModule>>()
    {
        {"Function",new List<FunctionModule>()
            {
              new FunctionModule(){Name = "Add",IsEnable =false },
              new FunctionModule(){Name = "Edit",IsEnable =false },
              new FunctionModule(){Name = "Remove",IsEnable =false },
              new FunctionModule(){Name = "Reload",IsEnable =true },
              new FunctionModule(){Name = "Collapse",IsEnable =false },
              new FunctionModule(){Name = "Exporter",IsEnable =false },
              new FunctionModule(){Name = "AllAdd",IsEnable =false },


            }
        }
    }
})

</body>



